﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ctlClientListSelector.ascx.cs" Inherits="Ctl_ctlClientListSelector" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<%@ Register src="ctlClientEditorNew.ascx" tagname="ctlClientEditorNew" tagprefix="uc1" %>
<div style="width :100%;height :150px">
<table style="width:100%;" class ="EditRowBackGround" cellspacing ="0">
    <tr>
        <td style="width :15px; vertical-align:top" class="grd_td_item">
            <asp:ImageButton ID="btnCancel" OnClick ="btnCancel_Click" runat="server" 
                ImageUrl="~/images/grd_minus.gif" />
        </td>
        <td class="grd_td_item">
            <asp:TextBox ID="txtFindStr" CssClass ="TextBox" Width ="98%" Text =<%# Where.ListLoadStatment.Lexeme  %> runat="server" ></asp:TextBox>
        </td>
        <td style ="width :10px" class="grd_td_item">
            &nbsp;</td>
        <td style="width :15px" class="grd_td_item">
            <asp:ImageButton ID="btnFind" runat="server" 
                ImageUrl="~/images/search_button.gif" onclick="btnFind_Click" />
        </td>
        <td style="width :15px" class="grd_td_item">
            <asp:ImageButton ID="btnAdd" runat="server" 
                ImageUrl="~/images/add.png" onclick="btnAdd_Click" />
        </td>
        
        <td style="width :15px" class="grd_td_item">
            <asp:ImageButton ID="btnSetEmptyRecord" runat="server"  ToolTip ="Пустая запись"
                ImageUrl="~/images/EmptyRecord.png" onclick="btnSetEmptyRecord_Click" />
        </td>
        
    </tr>
    </table>

<table width="100%">    
    <tr>
        <td style ="width :20px" ></td>
        <td >
            <table style ="width :100%"  >
            <asp:ListView ID="lvClients" runat="server" 
                    onpagepropertieschanged="lvClients_PagePropertiesChanged" >
    <LayoutTemplate  >  
    <tr runat="server" id="itemPlaceholder" ></tr>              
    </LayoutTemplate>
    <ItemTemplate >
    <tr>
        <td  style ="width:20px" >
            <asp:ImageButton ID="btnEdit" CommandArgument =<%# (string)Eval("ID") %> ImageUrl ="~/images/edit_text.gif" OnClick ="btnEdit_OnClick"  runat="server" />
        </td>
        <td    >
            <asp:LinkButton ID="btnSel"  OnClick ="btnSel_Click" CommandArgument=<%# (string)Eval("ID") %> runat="server"><%#(string) Eval("Name") %> </asp:LinkButton>
            
        </td>
    </tr> 
    </ItemTemplate> 
</asp:ListView> 

        </table>
        </td>
    </tr>
    <tr>
        <td style ="width :20px" >&nbsp;</td>
        <td >


<asp:DataPager ID="DataPager" runat="server" EnableViewState="true" 
    PagedControlID="lvClients" PageSize=<%# PageSize %> 
    Visible="<%# PagerVisible %>">
    <Fields>
        <asp:NumericPagerField ButtonCount="8" ButtonType="Link" NextPageText="--&gt;" 
            PreviousPageText="&lt;--" />
        <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="false" 
            ShowLastPageButton="false" ShowNextPageButton="false" 
            ShowPreviousPageButton="false" />
    </Fields>
</asp:DataPager>



        </td>
    </tr>
</table>
</div>

 <cc1:ModalPopupExtender ID="pop_pnlClientEdit" 
                    runat="server" 
                    TargetControlID="ProxyPopupControlID"
                    PopupControlID="pnlClientEdit"
                    PopupDragHandleControlID="pnlClientEdit"
                    BackgroundCssClass="modalBackground"
                    DropShadow="true"                                         
                    OkControlID="ProxyPopupControl_OkControlID"                    
                    CancelControlID="ProxyPopupControl_OkControlID"
                    X ="100" 
                    Y="45"
   
   >
   
   </cc1:ModalPopupExtender> 
   <asp:Panel ID="pnlClientEdit" CssClass="modalPopup" Width ="800px" Height ="600px" runat="server" style="display:none">
       <table style="width:100%;" cellpadding ="3" cellspacing ="0">
        <tr>
        <td  style ="font-weight :bold "   >
            Редактирование клиента  <asp:HiddenField ID="hfSelClient" runat ="server"  /> </td>
        <td style ="width :20px"  >
                <asp:ImageButton ID="btnClose" runat="server" OnClick ="btnClose_OnClick"  ImageUrl="~/images/close.gif" Width="16px" />
        </td>
    </tr>
    
    </table>
        <iframe  id="ClientControlWrapper"  width ="100%" height ="550px" frameborder ="0" runat="server"  ></iframe>
   </asp:Panel> 
   <asp:LinkButton ID="ProxyPopupControlID" runat="server"></asp:LinkButton>   
 <asp:LinkButton ID="ProxyPopupControl_OkControlID" runat="server"></asp:LinkButton>   







   






